Skip to content

Introduced a fixed mask length for password redaction, ensuring consistent output regardless of input length.#4

Merged
gustavofreze merged 1 commit intomainfrom
feature/develop
Feb 26, 2026
Merged

Introduced a fixed mask length for password redaction, ensuring consistent output regardless of input length.#4
gustavofreze merged 1 commit intomainfrom
feature/develop

Conversation

@gustavofreze
Copy link
Member

No description provided.

… consistent output regardless of input length.
Copilot AI review requested due to automatic review settings February 26, 2026 01:03
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38dd8be69b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates password redaction to use a fixed-length mask (defaulting to 8 asterisks) so logs no longer leak the original password length, and adds documentation/tests to reflect the new behavior.

Changes:

  • Update PasswordRedaction to emit a fixed-length mask (with configurable length via from(..., fixedMaskLength: N)).
  • Expand PHPUnit coverage to validate fixed-length masking for short/long values and custom mask length.
  • Update README password redaction docs/examples; minor refactor in EmailRedaction local variable ordering.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/StructuredLoggerTest.php Updates existing password assertions and adds new tests for fixed-length masking and custom mask length.
src/Redactions/PasswordRedaction.php Implements fixed-length masking and adds configurable fixedMaskLength with default.
src/Redactions/EmailRedaction.php Reorders local variables in masking logic (no functional change intended).
README.md Documents fixed-length password masking behavior and custom configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gustavofreze gustavofreze merged commit 9d0f402 into main Feb 26, 2026
10 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch February 26, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants